Skip to main content

Getting started with cURL to request CSV Files

Usage Example in cURL​

Sometimes you just want to get the time series data as CSV file without further ado for analysis in your most beloved CSV parsing tool.

As always you need a valid API key first. Please consult the Getting Started page for details regarding API key generation.

Data Access​

info

The time series API requires the Data Butler Quality package.

With this API key at hand we can proceed to (for example) request all available data files for a specified ship in a given time period as CSV file.

curl --location --request GET 'https://api.hoppe-sts.com/ships/<IMO>/data/series?from_date=<START-DATE>&to_date=<END-DATE>' \
--header 'Content-Type: application/json' \
--header 'Accept: text/csv' \
--header 'Authorization: ApiKey <API Key Value>' \
--data-raw '' > data.csv

Please remember to replace the <API Key Value>, <IMO>, <START-DATE> and <END-DATE> fields with the values relevant to your specific request. The datetime fields use the ISO 8601 notation YYYY-MM-DDThh:mm:ss.

This example should get you easily started with using cURL to access your data in the cloud.

caution

Please always treat each API key as secret and do not share it with any unauthorized persons. An API key allows access to some of your most valuable assets: your data.